<?php
class Master_th_ajaran extends CI_Model 
{

	function __construct()
	{
		parent::__construct();
	}

	function read()
	{	
		$this->db->order_by('id_mr_th_ajaran','desc');		
		$query=$this->db->get('mr_th_ajaran');
		return $query->result();
	}	

	function num_rows()
	{	
		$query = $this->db->get('mr_th_ajaran');
		return $query->num_rows();
	}	
	
	function detail($id_mr_th_ajaran)
	{
		$this->db->where('id_mr_th_ajaran',$id_mr_th_ajaran);
		$query=$this->db->get('mr_th_ajaran');
		return $query->result();
	}	

	function limit($limit,$offset)
	{	
		$this->db->order_by('id_mr_th_ajaran','desc');		
		$query=$this->db->get('mr_th_ajaran',$limit,$offset);
		return $query->result();
	}
	
}